using System;

namespace Curriculum.UI.Helper
{
	/// <summary>
	/// Summary description for FormHelper.
	/// </summary>
	public class FormHelper
	{
		#region - FindControl -

		public static System.Windows.Forms.Control FindControl(string ctrlName, System.Windows.Forms.Control owner) 
		{ 
			System.Windows.Forms.Control ctrl = owner; 
			do 
			{ 
				ctrl = owner.GetNextControl(ctrl,true); 

				if (ctrl.Name == ctrlName) 
				{ 
					return ctrl; 
				} 
			} 
			while (ctrl != owner && ctrl != null); 

			return null; 
		} 
		
		
		#endregion - FindControl -

	}
}
